package m.html.element;

import m.html.element.other.InputElement;

public class Switch extends InputElement {
    public Switch(String field, String value,String checkedValue,String unCheckedValue) {
        super("a-switch");
        this.A("v-model:checked",field);
        this.A("value", value);
        this.A("checkedValue",checkedValue);
        this.A("unCheckedValue",unCheckedValue);
        viewElement=Element.tag("a-switch").A("checked",value.equals(checkedValue)?"true":"false");
    }
    public Switch(String field,String checkedValue,String unCheckedValue) {
        this(field,checkedValue,checkedValue,unCheckedValue);
    }

}
